
<!doctype html>
<html lang="en" class="no-js">
  <head>
    
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width,initial-scale=1">
      
        <meta name="description" content="A complete runtime environment for GCC & LLVM for 32-bit (x86), 64-bit (x64), and ARM64 Windows">
      
      
      
        <link rel="canonical" href="https://www.mingw-w64.org/contribute/">
      
      
        <link rel="prev" href="../support/">
      
      
        <link rel="next" href="../donate/">
      
      
      <link rel="icon" href="../logo.svg">
      <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.3">
    
    
      
        <title>Contribute - mingw-w64</title>
      
    
    
      <link rel="stylesheet" href="../assets/stylesheets/main.d7758b05.min.css">
      
        
        <link rel="stylesheet" href="../assets/stylesheets/palette.06af60db.min.css">
      
      


    
    
      
    
    
      
    
    
      <link rel="stylesheet" href="../stylesheets/extra.css">
    
      <link rel="stylesheet" href="../stylesheets/fonts.css">
    
    <script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
    
      

    
    
    
  </head>
  
  
    
    
      
    
    
    
    
    <body dir="ltr" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo">
  
    
    <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
    <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
    <label class="md-overlay" for="__drawer"></label>
    <div data-md-component="skip">
      
        
        <a href="#contribute" class="md-skip">
          Skip to content
        </a>
      
    </div>
    <div data-md-component="announce">
      
    </div>
    
    
      

  

<header class="md-header md-header--shadow" data-md-component="header">
  <nav class="md-header__inner md-grid" aria-label="Header">
    <a href=".." title="mingw-w64" class="md-header__button md-logo" aria-label="mingw-w64" data-md-component="logo">
      
  <img src="../logo.svg" alt="logo">

    </a>
    <label class="md-header__button md-icon" for="__drawer">
      
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
    </label>
    <div class="md-header__title" data-md-component="header-title">
      <div class="md-header__ellipsis">
        <div class="md-header__topic">
          <span class="md-ellipsis">
            mingw-w64
          </span>
        </div>
        <div class="md-header__topic" data-md-component="header-topic">
          <span class="md-ellipsis">
            
              Contribute
            
          </span>
        </div>
      </div>
    </div>
    
      
        <form class="md-header__option" data-md-component="palette">
  
    
    
    
    <input class="md-option" data-md-color-media="(prefers-color-scheme)" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo"  aria-label="Switch to light mode"  type="radio" name="__palette" id="__palette_0">
    
      <label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden>
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m14.3 16-.7-2h-3.2l-.7 2H7.8L11 7h2l3.2 9zM20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zm-9.15 3.96h2.3L12 9z"/></svg>
      </label>
    
  
    
    
    
    <input class="md-option" data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme="default" data-md-color-primary="white" data-md-color-accent="indigo"  aria-label="Switch to dark mode"  type="radio" name="__palette" id="__palette_1">
    
      <label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_2" hidden>
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
      </label>
    
  
    
    
    
    <input class="md-option" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme="slate" data-md-color-primary="black" data-md-color-accent="indigo"  aria-label="Switch to light mode"  type="radio" name="__palette" id="__palette_2">
    
      <label class="md-header__button md-icon" title="Switch to light mode" for="__palette_0" hidden>
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
      </label>
    
  
</form>
      
    
    
      <script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
    
    
    
      <label class="md-header__button md-icon" for="__search">
        
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
      </label>
      <div class="md-search" data-md-component="search" role="dialog">
  <label class="md-search__overlay" for="__search"></label>
  <div class="md-search__inner" role="search">
    <form class="md-search__form" name="search">
      <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
      <label class="md-search__icon md-icon" for="__search">
        
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
        
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
      </label>
      <nav class="md-search__options" aria-label="Search">
        
        <button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
          
          <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
        </button>
      </nav>
      
    </form>
    <div class="md-search__output">
      <div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
        <div class="md-search-result" data-md-component="search-result">
          <div class="md-search-result__meta">
            Initializing search
          </div>
          <ol class="md-search-result__list" role="presentation"></ol>
        </div>
      </div>
    </div>
  </div>
</div>
    
    
      <div class="md-header__source">
        <a href="https://github.com/mingw-w64/mingw-w64.github.io" title="Go to repository" class="md-source" data-md-component="source">
  <div class="md-source__icon md-icon">
    
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81"/></svg>
  </div>
  <div class="md-source__repository">
    GitHub
  </div>
</a>
      </div>
    
  </nav>
  
</header>
    
    <div class="md-container" data-md-component="container">
      
      
        
          
        
      
      <main class="md-main" data-md-component="main">
        <div class="md-main__inner md-grid">
          
            
              
              <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
                <div class="md-sidebar__scrollwrap">
                  <div class="md-sidebar__inner">
                    



<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
  <label class="md-nav__title" for="__drawer">
    <a href=".." title="mingw-w64" class="md-nav__button md-logo" aria-label="mingw-w64" data-md-component="logo">
      
  <img src="../logo.svg" alt="logo">

    </a>
    mingw-w64
  </label>
  
    <div class="md-nav__source">
      <a href="https://github.com/mingw-w64/mingw-w64.github.io" title="Go to repository" class="md-source" data-md-component="source">
  <div class="md-source__icon md-icon">
    
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81"/></svg>
  </div>
  <div class="md-source__repository">
    GitHub
  </div>
</a>
    </div>
  
  <ul class="md-nav__list" data-md-scrollfix>
    
      
      
  
  
  
  
    <li class="md-nav__item">
      <a href=".." class="md-nav__link">
        
  
  <span class="md-ellipsis">
    Introduction
    
  </span>
  

      </a>
    </li>
  

    
      
      
  
  
  
  
    <li class="md-nav__item">
      <a href="../changelog/" class="md-nav__link">
        
  
  <span class="md-ellipsis">
    Changelog
    
  </span>
  

      </a>
    </li>
  

    
      
      
  
  
  
  
    
    
    
    
    <li class="md-nav__item md-nav__item--nested">
      
        
        
        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >
        
          
          <label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="0">
            
  
  <span class="md-ellipsis">
    Downloads
    
  </span>
  

            <span class="md-nav__icon md-icon"></span>
          </label>
        
        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
          <label class="md-nav__title" for="__nav_3">
            <span class="md-nav__icon md-icon"></span>
            Downloads
          </label>
          <ul class="md-nav__list" data-md-scrollfix>
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../downloads/" class="md-nav__link">
        
  
  <span class="md-ellipsis">
    Pre-built Toolchains
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../source/" class="md-nav__link">
        
  
  <span class="md-ellipsis">
    Source Code
    
  </span>
  

      </a>
    </li>
  

              
            
          </ul>
        </nav>
      
    </li>
  

    
      
      
  
  
  
  
    
    
    
    
    <li class="md-nav__item md-nav__item--nested">
      
        
        
        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4" >
        
          
          <label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="0">
            
  
  <span class="md-ellipsis">
    Getting Started
    
  </span>
  

            <span class="md-nav__icon md-icon"></span>
          </label>
        
        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false">
          <label class="md-nav__title" for="__nav_4">
            <span class="md-nav__icon md-icon"></span>
            Getting Started
          </label>
          <ul class="md-nav__list" data-md-scrollfix>
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../getting-started/archlinux/" class="md-nav__link">
        
  
  <span class="md-ellipsis">
    Arch Linux
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../getting-started/debian/" class="md-nav__link">
        
  
  <span class="md-ellipsis">
    Debian / Ubuntu
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../getting-started/fedora/" class="md-nav__link">
        
  
  <span class="md-ellipsis">
    Fedora
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../getting-started/msys2/" class="md-nav__link">
        
  
  <span class="md-ellipsis">
    MSYS2 (GCC)
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../getting-started/msys2-llvm/" class="md-nav__link">
        
  
  <span class="md-ellipsis">
    MSYS2 (Clang/LLVM)
    
  </span>
  

      </a>
    </li>
  

              
            
          </ul>
        </nav>
      
    </li>
  

    
      
      
  
  
  
  
    
    
    
    
    <li class="md-nav__item md-nav__item--nested">
      
        
        
        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5" >
        
          
          <label class="md-nav__link" for="__nav_5" id="__nav_5_label" tabindex="0">
            
  
  <span class="md-ellipsis">
    Build Systems
    
  </span>
  

            <span class="md-nav__icon md-icon"></span>
          </label>
        
        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="false">
          <label class="md-nav__title" for="__nav_5">
            <span class="md-nav__icon md-icon"></span>
            Build Systems
          </label>
          <ul class="md-nav__list" data-md-scrollfix>
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../build-systems/meson/" class="md-nav__link">
        
  
  <span class="md-ellipsis">
    Meson
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../build-systems/cmake/" class="md-nav__link">
        
  
  <span class="md-ellipsis">
    CMake
    
  </span>
  

      </a>
    </li>
  

              
            
          </ul>
        </nav>
      
    </li>
  

    
      
      
  
  
  
  
    
    
    
    
    <li class="md-nav__item md-nav__item--nested">
      
        
        
        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6" >
        
          
          <label class="md-nav__link" for="__nav_6" id="__nav_6_label" tabindex="0">
            
  
  <span class="md-ellipsis">
    Tools
    
  </span>
  

            <span class="md-nav__icon md-icon"></span>
          </label>
        
        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_6_label" aria-expanded="false">
          <label class="md-nav__title" for="__nav_6">
            <span class="md-nav__icon md-icon"></span>
            Tools
          </label>
          <ul class="md-nav__list" data-md-scrollfix>
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../tools/gendef/" class="md-nav__link">
        
  
  <span class="md-ellipsis">
    gendef
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../tools/genidl/" class="md-nav__link">
        
  
  <span class="md-ellipsis">
    genidl
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../tools/genpeimg/" class="md-nav__link">
        
  
  <span class="md-ellipsis">
    genpeimg
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../tools/widl/" class="md-nav__link">
        
  
  <span class="md-ellipsis">
    widl
    
  </span>
  

      </a>
    </li>
  

              
            
          </ul>
        </nav>
      
    </li>
  

    
      
      
  
  
  
  
    <li class="md-nav__item">
      <a href="../support/" class="md-nav__link">
        
  
  <span class="md-ellipsis">
    Support &amp; Contact
    
  </span>
  

      </a>
    </li>
  

    
      
      
  
  
    
  
  
  
    
    
    
    
    <li class="md-nav__item md-nav__item--active md-nav__item--nested">
      
        
        
        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8" checked>
        
          
          <label class="md-nav__link" for="__nav_8" id="__nav_8_label" tabindex="0">
            
  
  <span class="md-ellipsis">
    Old Pages
    
  </span>
  

            <span class="md-nav__icon md-icon"></span>
          </label>
        
        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_8_label" aria-expanded="true">
          <label class="md-nav__title" for="__nav_8">
            <span class="md-nav__icon md-icon"></span>
            Old Pages
          </label>
          <ul class="md-nav__list" data-md-scrollfix>
            
              
                
  
  
    
  
  
  
    <li class="md-nav__item md-nav__item--active">
      
      <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
      
      
        
      
      
        <label class="md-nav__link md-nav__link--active" for="__toc">
          
  
  <span class="md-ellipsis">
    Contribute
    
  </span>
  

          <span class="md-nav__icon md-icon"></span>
        </label>
      
      <a href="./" class="md-nav__link md-nav__link--active">
        
  
  <span class="md-ellipsis">
    Contribute
    
  </span>
  

      </a>
      
        

<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  
  
  
    
  
  
    <label class="md-nav__title" for="__toc">
      <span class="md-nav__icon md-icon"></span>
      Table of contents
    </label>
    <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
      
        <li class="md-nav__item">
  <a href="#win32-api-and-runtime" class="md-nav__link">
    <span class="md-ellipsis">
      Win32 API and Runtime
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#seh-for-32bits" class="md-nav__link">
    <span class="md-ellipsis">
      SEH for 32bits
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#sanitizers-asan-tsan-usan" class="md-nav__link">
    <span class="md-ellipsis">
      Sanitizers (ASAN, TSAN, USAN)
    </span>
  </a>
  
    <nav class="md-nav" aria-label="Sanitizers (ASAN, TSAN, USAN)">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#thorough-status-report-for-sanitizers-asan-tsan-usan" class="md-nav__link">
    <span class="md-ellipsis">
      Thorough Status Report for Sanitizers (asan, tsan, usan)
    </span>
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#fixing-remaining-bits-in-asan-tsan-or-usan-see-above" class="md-nav__link">
    <span class="md-ellipsis">
      Fixing remaining bits in asan, tsan or usan (see above)
    </span>
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#link-time-optimization-lto" class="md-nav__link">
    <span class="md-ellipsis">
      Link-Time Optimization (LTO)
    </span>
  </a>
  
    <nav class="md-nav" aria-label="Link-Time Optimization (LTO)">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#thorough-status-report-for-lto" class="md-nav__link">
    <span class="md-ellipsis">
      Thorough Status Report for LTO
    </span>
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#fixing-remaining-bits-in-lto" class="md-nav__link">
    <span class="md-ellipsis">
      Fixing remaining bits in LTO
    </span>
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#compiler-plugin-for-visual-studio" class="md-nav__link">
    <span class="md-ellipsis">
      Compiler plugin for Visual Studio
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#debug-infos" class="md-nav__link">
    <span class="md-ellipsis">
      Debug Infos
    </span>
  </a>
  
    <nav class="md-nav" aria-label="Debug Infos">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#documentation-of-the-pdb-file-format" class="md-nav__link">
    <span class="md-ellipsis">
      Documentation of the PDB file-format
    </span>
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#creation-of-pdb-files" class="md-nav__link">
    <span class="md-ellipsis">
      Creation of PDB files
    </span>
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#handling-of-pdb-in-gdb" class="md-nav__link">
    <span class="md-ellipsis">
      Handling of PDB in GDB
    </span>
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#translation-fromto-pdb" class="md-nav__link">
    <span class="md-ellipsis">
      Translation from/to PDB
    </span>
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#c11-and-c11-threading-support" class="md-nav__link">
    <span class="md-ellipsis">
      C11 and C++11 Threading Support
    </span>
  </a>
  
    <nav class="md-nav" aria-label="C11 and C++11 Threading Support">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#c11-threading-and-atomics" class="md-nav__link">
    <span class="md-ellipsis">
      C11 Threading and Atomics
    </span>
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#implementation-of-c11-and-c11-threading-support-without-winpthreads" class="md-nav__link">
    <span class="md-ellipsis">
      Implementation of C11 and C++11 Threading Support Without Winpthreads
    </span>
  </a>
  
    <nav class="md-nav" aria-label="Implementation of C11 and C++11 Threading Support Without Winpthreads">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#mcfgthread" class="md-nav__link">
    <span class="md-ellipsis">
      mcfgthread
    </span>
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
    </ul>
  
</nav>
      
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../donate/" class="md-nav__link">
        
  
  <span class="md-ellipsis">
    Donate
    
  </span>
  

      </a>
    </li>
  

              
            
          </ul>
        </nav>
      
    </li>
  

    
  </ul>
</nav>
                  </div>
                </div>
              </div>
            
            
              
              <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
                <div class="md-sidebar__scrollwrap">
                  <div class="md-sidebar__inner">
                    

<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  
  
  
    
  
  
    <label class="md-nav__title" for="__toc">
      <span class="md-nav__icon md-icon"></span>
      Table of contents
    </label>
    <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
      
        <li class="md-nav__item">
  <a href="#win32-api-and-runtime" class="md-nav__link">
    <span class="md-ellipsis">
      Win32 API and Runtime
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#seh-for-32bits" class="md-nav__link">
    <span class="md-ellipsis">
      SEH for 32bits
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#sanitizers-asan-tsan-usan" class="md-nav__link">
    <span class="md-ellipsis">
      Sanitizers (ASAN, TSAN, USAN)
    </span>
  </a>
  
    <nav class="md-nav" aria-label="Sanitizers (ASAN, TSAN, USAN)">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#thorough-status-report-for-sanitizers-asan-tsan-usan" class="md-nav__link">
    <span class="md-ellipsis">
      Thorough Status Report for Sanitizers (asan, tsan, usan)
    </span>
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#fixing-remaining-bits-in-asan-tsan-or-usan-see-above" class="md-nav__link">
    <span class="md-ellipsis">
      Fixing remaining bits in asan, tsan or usan (see above)
    </span>
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#link-time-optimization-lto" class="md-nav__link">
    <span class="md-ellipsis">
      Link-Time Optimization (LTO)
    </span>
  </a>
  
    <nav class="md-nav" aria-label="Link-Time Optimization (LTO)">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#thorough-status-report-for-lto" class="md-nav__link">
    <span class="md-ellipsis">
      Thorough Status Report for LTO
    </span>
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#fixing-remaining-bits-in-lto" class="md-nav__link">
    <span class="md-ellipsis">
      Fixing remaining bits in LTO
    </span>
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#compiler-plugin-for-visual-studio" class="md-nav__link">
    <span class="md-ellipsis">
      Compiler plugin for Visual Studio
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#debug-infos" class="md-nav__link">
    <span class="md-ellipsis">
      Debug Infos
    </span>
  </a>
  
    <nav class="md-nav" aria-label="Debug Infos">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#documentation-of-the-pdb-file-format" class="md-nav__link">
    <span class="md-ellipsis">
      Documentation of the PDB file-format
    </span>
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#creation-of-pdb-files" class="md-nav__link">
    <span class="md-ellipsis">
      Creation of PDB files
    </span>
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#handling-of-pdb-in-gdb" class="md-nav__link">
    <span class="md-ellipsis">
      Handling of PDB in GDB
    </span>
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#translation-fromto-pdb" class="md-nav__link">
    <span class="md-ellipsis">
      Translation from/to PDB
    </span>
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#c11-and-c11-threading-support" class="md-nav__link">
    <span class="md-ellipsis">
      C11 and C++11 Threading Support
    </span>
  </a>
  
    <nav class="md-nav" aria-label="C11 and C++11 Threading Support">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#c11-threading-and-atomics" class="md-nav__link">
    <span class="md-ellipsis">
      C11 Threading and Atomics
    </span>
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#implementation-of-c11-and-c11-threading-support-without-winpthreads" class="md-nav__link">
    <span class="md-ellipsis">
      Implementation of C11 and C++11 Threading Support Without Winpthreads
    </span>
  </a>
  
    <nav class="md-nav" aria-label="Implementation of C11 and C++11 Threading Support Without Winpthreads">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#mcfgthread" class="md-nav__link">
    <span class="md-ellipsis">
      mcfgthread
    </span>
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
    </ul>
  
</nav>
                  </div>
                </div>
              </div>
            
          
          
            <div class="md-content" data-md-component="content">
              <article class="md-content__inner md-typeset">
                
                  


  
    <a href="https://github.com/mingw-w64/mingw-w64.github.io/edit/source/web/contribute.md" title="Edit this page" class="md-content__button md-icon">
      
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 20H6V4h7v5h5v3.1l2-2V8l-6-6H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h4zm10.2-7c.1 0 .3.1.4.2l1.3 1.3c.2.2.2.6 0 .8l-1 1-2.1-2.1 1-1c.1-.1.2-.2.4-.2m0 3.9L14.1 23H12v-2.1l6.1-6.1z"/></svg>
    </a>
  
  


<h1 id="contribute">Contribute</h1>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>The information on this page is outdated and needs to be updated.</p>
</div>
<p>Mingw-w64 and the ecosystem surrounding it are stable and with many features.
There are however some topics for which developer-time has been scarce. This
page lists tasks that are relatively simple and can be worked on without the
need for a huge background while still being important and high on the
wish-lists of users.</p>
<p>In order to avoid duplicate efforts, if you take on one of these tasks, please
mention it on the
<a href="https://lists.sourceforge.net/mailman/listinfo/mingw-w64-public">mailing-list</a>.</p>
<p>The tasks below have been split enough to be simple and fairly well-contained
while still being useful on their own. Most could be internship topics.</p>
<p>There are references to other websites on this page; their presence does not
constitute an endorsement in any way.</p>
<h2 id="win32-api-and-runtime">Win32 API and Runtime</h2>
<p>Mingw-w64 is constantly looking for updates to its win32 API headers from <a href="https://msdn.microsoft.com/en-us/library/">MSDN
Library</a>. If you believe you have
found an API that is not available in mingw-w64 but is documented as part of
MSDN or a mistake in mingw-w64, please do not hesitate to contact us through the
<a href="https://lists.sourceforge.net/mailman/listinfo/mingw-w64-public">mailing-list</a>.</p>
<p>For patch submissions, please remember to use sign-off your git commits before
submitting the patches to the
<a href="https://lists.sourceforge.net/mailman/listinfo/mingw-w64-public">mailing-list</a>.
Both git send-email and git format-patch forms are allowed. From past
experiences however, if you do use an email client to attach individual patches,
please use the .txt extension, especially for Google Mail users so the patch
does not get treated as a binary.</p>
<h2 id="seh-for-32bits">SEH for 32bits</h2>
<p>The patent for SEH for 32bits has now expired and while new computers
are all 64 bits, Intel has continued selling Atom CPUs that only handled
32 bits very late and some applications are still 32 bits. Projects such
as Wine and ReactOS will also benefit from 32bits SEH. Overall the need
is still there and will continue for years to come and will outlast
Microsoft's support for 32bits.</p>
<p>Note that you will need FSF paperwork since the work has to be done
inside GCC. Check CC's page on contributing.</p>
<ul>
<li><a href="https://www.google.com/patents/US5628016">The now-expired patent on SEH</a></li>
<li><a href="https://www.microsoft.com/msj/0197/exception/exception.aspx">A Crash Course on the Depths of Win32™ Structured Exception Handling</a></li>
<li><a href="https://www.codeproject.com/Articles/82701/Win-Exceptions-OS-Level-Point-of-View">Win32 Exceptions – OS Level Point of View</a></li>
<li><a href="https://www.codeproject.com/Articles/2126/How-a-C-compiler-implements-exception-handling">How a C++ compiler implements exception handling</a></li>
<li><a href="https://www.gamedev.net/page/resources/_/technical/general-programming/structured-exception-handling-basics-r1272">Structured Exception Handling Basics</a></li>
<li><a href="https://www.gamedev.net/page/resources/_/technical/general-programming/windows-seh-and-c-exception-handling-r1291">Windows' SEH and C++ Exception Handling</a></li>
<li><a href="http://blogs.msdn.com/b/larryosterman/archive/2004/09/10/228068.aspx">Structured Exception Handling Considered Harmful</a></li>
<li><a href="https://www.codeproject.com/Articles/422/SEH-and-C-Exceptions-catch-all-in-one">SEH and C++ Exceptions - catch all in one</a></li>
<li><a href="https://gcc.gnu.org/git/?p=gcc.git">GCC sources</a> and
  <a href="https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libgcc/unwind-seh.c;hb=HEAD">unwind-seh.c</a>
  in particular. Note that 32-bit SEH is stack-based and requires
  code-generation unlike 64bits SEH which is simply table-based (that difference
  explains why the patent only mattered to 32bits).</li>
</ul>
<h2 id="sanitizers-asan-tsan-usan">Sanitizers (ASAN, TSAN, USAN)</h2>
<p>Sanitizers are runtime checks for a number of situations which have
usually required instrumentation with tools that cause an important
slowdown (like Valgrind).</p>
<p>They are relatively new and much lighter than other approaches.</p>
<h3 id="thorough-status-report-for-sanitizers-asan-tsan-usan">Thorough Status Report for Sanitizers (asan, tsan, usan)</h3>
<p>ASAN, TSAN and USAN are great technologies which are available in GCC.
Unfortunately they are not completely usable on Windows. A proper review
and tests are needed before anything.</p>
<h3 id="fixing-remaining-bits-in-asan-tsan-or-usan-see-above">Fixing remaining bits in asan, tsan or usan (see above)</h3>
<p>Once a report on the status is available, work on it can be started.</p>
<h2 id="link-time-optimization-lto">Link-Time Optimization (LTO)</h2>
<p>Optimizations in C cannot cross compilation units and many of them are
therefore missed in large applications and when using libraries. LTO
runs some optimizations during linking, when the toolchain can see all
the objects at once and run cross-unit optimizations.</p>
<h3 id="thorough-status-report-for-lto">Thorough Status Report for LTO</h3>
<p>LTO has recently been improved a lot in GCC and binutils. There are
still some issues on Windows though. The first step to making it work is
to get a proper and up-to-date test and to identify the
platform-specific bugs.</p>
<h3 id="fixing-remaining-bits-in-lto">Fixing remaining bits in LTO</h3>
<p>Fix the issues found by the status report from above. The actual bug
list will be updated as it becomes available.</p>
<h2 id="compiler-plugin-for-visual-studio">Compiler plugin for Visual Studio</h2>
<p>A compiler plugin would make GCC, binutils tools and GDB available from
the Visual Studio IDE. Most people state they stick with VS because of
the IDE; such a plugin would allow mixing the two.</p>
<p><a href="http://www.visualgdb.com/">VisualGDB</a> (commercial) provides such a plugin,
apparently meant for compiling to micro-controllers and Linux (Android or not).</p>
<h2 id="debug-infos">Debug Infos</h2>
<p>PDB is the file-format used by Microsoft to store debug info.
Unfortunately it is undocumented.</p>
<h3 id="documentation-of-the-pdb-file-format">Documentation of the PDB file-format</h3>
<p>Since the format is undocumented, first step is to document it.
Fortunately, during the past few years, reader and possibly writer code
has appeared, mostly out of Microsoft.</p>
<ul>
<li>
<p>A <a href="https://github.com/luser/dump_syms.git">library named ''dump_syms''</a> is
  available. It can read PDB files at least to some extent. Licensing and origin
  need to be checked.</p>
</li>
<li>
<p>Microsoft has released <a href="http://roslyn.codeplex.com/">Roslyn, a ".NET Compiler
  Platform"</a>. It contains a <a href="https://roslyn.codeplex.com/SourceControl/latest#Src/Compilers/Core/Portable/PEWriter/PdbWriter.cs">PDB writer
  implementation</a>.
  This may be an actual implementation or only an interface to the actual one.
  It is difficult to say without further analysis.</p>
</li>
<li>
<p>Microsoft has also released <a href="http://ccimetadata.codeplex.com/">CCI Metadata</a>
  under the <a href="https://opensource.org/licenses/ms-pl.html">MS-PL</a>. It contains <a href="http://ccimetadata.codeplex.com/SourceControl/latest#Sources/PdbReader/">PDB
  reader
  implementation</a>
  that should constitute an appropriate source.</p>
</li>
</ul>
<h3 id="creation-of-pdb-files">Creation of PDB files</h3>
<p>Creating PDB files will allow the Microsoft tools to make meaningful
backtraces when code built with free compilers is involved.</p>
<h3 id="handling-of-pdb-in-gdb">Handling of PDB in GDB</h3>
<p>Reading PDB files will allow free tools to make meaningful backtraces
when code built with MSVC is involved.</p>
<h3 id="translation-fromto-pdb">Translation from/to PDB</h3>
<p>Most often debug information will only be available in a single format. Being
able to convert between them when needed will be useful.</p>
<h2 id="c11-and-c11-threading-support">C11 and C++11 Threading Support</h2>
<h3 id="c11-threading-and-atomics">C11 Threading and Atomics</h3>
<p>The C11 standard has a section on threading which is still left unimplemented on
several platforms. The API follows pthreads' quite closely and it is left to the
implementer to decide whether to base it on winpthreads or directly on the (&gt;=
Vista) Win32 API.</p>
<p><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf">The final C11 draft</a>
is identical to the standard but is available freely.</p>
<p>Note that you will need FSF paperwork since the work has to be done inside GCC.
Check <a href="https://gcc.gnu.org/contribute.html">GCC's page on contributing</a>.</p>
<h3 id="implementation-of-c11-and-c11-threading-support-without-winpthreads">Implementation of C11 and C++11 Threading Support Without Winpthreads</h3>
<h4 id="mcfgthread">mcfgthread</h4>
<p>The <a href="https://github.com/lhmouse/mcfgthread">mcfgthread</a> library aims at
providing an efficient implementation of thread support for GCC that is required
by the C11 and C++11 standard. It uses a lot of undocumented Windows NT syscalls
to ensure performance. Its introduction and manual can be found from its <a href="https://github.com/lhmouse/mcfgthread/wiki">wiki
pages</a>.</p>












                
              </article>
            </div>
          
          
  <script>var tabs=__md_get("__tabs");if(Array.isArray(tabs))e:for(var set of document.querySelectorAll(".tabbed-set")){var labels=set.querySelector(".tabbed-labels");for(var tab of tabs)for(var label of labels.getElementsByTagName("label"))if(label.innerText.trim()===tab){var input=document.getElementById(label.htmlFor);input.checked=!0;continue e}}</script>

<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
        </div>
        
      </main>
      
        <footer class="md-footer">
  
  <div class="md-footer-meta md-typeset">
    <div class="md-footer-meta__inner md-grid">
      <div class="md-copyright">
  
  
    Made with
    <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
      Material for MkDocs
    </a>
  
</div>
      
    </div>
  </div>
</footer>
      
    </div>
    <div class="md-dialog" data-md-component="dialog">
      <div class="md-dialog__inner md-typeset"></div>
    </div>
    
    
    <script id="__config" type="application/json">{"base": "..", "features": ["navigation.instant", "content.action.edit", "content.code.copy", "content.tabs.link"], "search": "../assets/javascripts/workers/search.f8cc74c7.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>
    
    
      <script src="../assets/javascripts/bundle.f1b6f286.min.js"></script>
      
    
  </body>
</html>